home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 4 / QRZ Ham Radio Callsign Database - Volume 4.iso / files / tcpip / amiga / asrc29p.lha / session.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-29  |  2.1 KB  |  74 lines

  1. #ifndef    NULLSESSION
  2. #include <stdio.h>
  3. #include "global.h"
  4. #include "ftpcli.h"
  5. #include "telnet.h"
  6. #include "icmp.h"
  7. #include "ax25.h"
  8. #include "proc.h"
  9. #include "tty.h"
  10.  
  11. #define    MOREROWS    24    /* rows on screen before --more-- */
  12.  
  13. /* Session control structure; only one entry is used at a time */
  14. struct session {
  15.     int type;
  16. #define    FREE        0
  17. #define    TELNET        1
  18. #define    FTP        2
  19. #define    AX25TNC        3
  20. #define    FINGER        4
  21. #define    PING        5
  22. #define NRSESSION    6
  23. #define    COMMAND        7
  24. #define    MORE        8
  25. #define    HOP        9
  26. #define POST        10
  27. #define    RLOGIN        11
  28. #define PPPPASS        12
  29.     char *name;    /* Name of remote host */
  30.     union {
  31.         struct ftpcli *ftp;
  32.         struct telnet *telnet;
  33.     } cb;
  34.     struct proc *proc;    /* Primary session process (e.g., tn recv) */
  35.     struct proc *proc1;    /* Secondary session process (e.g., tn xmit) */
  36.     struct proc *proc2;    /* Tertiary session process (e.g., upload) */
  37.     int s;            /* Primary network socket (control for FTP) */
  38.     FILE *record;        /* Receive record file */
  39.     char *rfile;        /* Record file name */
  40.     FILE *upload;        /* Send file */
  41.     char *ufile;        /* Upload file name */
  42.     struct ttystate ttystate;
  43.     struct screen *screen;
  44.     int input;        /* Input socket */
  45.     int output;        /* Output socket */
  46.     int flowmode;        /* control "more" mode */
  47.     int row;        /* Rows remaining until "more" */
  48.     int morewait;        /* Output driver is waiting on us */
  49.     int split;        /* Signal for split-screen */
  50. };
  51. #define    NULLSESSION    (struct session *)0
  52.  
  53. extern char *Sestypes[];
  54. extern unsigned Nsessions;        /* Maximum number of sessions */
  55. extern struct session *Sessions;    /* Session descriptors themselves */
  56. extern struct session *Current;        /* Always points to current session */
  57. extern struct session *Lastcurr;    /* Last non-command session */
  58. extern struct session *Command;        /* Pointer to command session */
  59.  
  60. /* In session.c: */
  61. void freesession __ARGS((struct session *sp));
  62. struct session *sessptr __ARGS((char *cp));
  63. struct session *newsession __ARGS((char *name,int type,int split));
  64. void upload __ARGS((int unused,void *sp1,void *p));
  65.  
  66. /* In pc.c: */
  67. void swapscreen __ARGS((struct session *old,struct session *new));
  68.  
  69. extern int16 Lport;
  70. #define    ALERT_EOF    1
  71.  
  72.  
  73. #endif    /* NULLSESSION */
  74.